package ${basePackage}.cli.command;

import ${basePackage}.cli.command.children.ConfigCommand;
import ${basePackage}.cli.command.children.GenerateCommand;
import ${basePackage}.cli.command.children.ListCommand;
import picocli.CommandLine;

@CommandLine.Command(name = "${name}", description = "executor command", mixinStandardHelpOptions = true)
public class CommandExecutor implements Runnable {
private final CommandLine commandLine;

{
commandLine = new CommandLine(this).
addSubcommand(new GenerateCommand())
.addSubcommand(new ListCommand())
.addSubcommand(new ConfigCommand());
}

@Override
public void run() {
System.out.println("欢迎使用低代码生成工具,输入--help查看命令提示");
}

//执行命令
public Integer execute(String[] args) {
return commandLine.execute(args);
}
}
